﻿<%@ Page Language="C#" MasterPageFile="~/A_LetsDeal/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="A_LetsDeal_Default"  %>

<%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
 <div style="float:right;">
            <asp:Button CssClass="buttonsearch" Text="Tìm kiếm" runat="server" 
                  ID="bt_timkiem" onclick="bt_timkiem_Click"/>
                </div>            
            <div style="float:right;">
            <asp:TextBox ID="txt_timkiem"  CssClass="textsearch" runat="server"/>
            </div>
</asp:Content>      
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">

</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Repeater ID="Repeater1" runat="server" onitemdatabound="Repeater1_ItemDataBound">
    <HeaderTemplate>
    <div class="tieude" style="margin-top:-32px;background-color:white;">
            <div class="tieude-text" style="color:Black">SẢN PHẨM MỚI</div></div>
    </HeaderTemplate>
    <ItemTemplate>
    <div class="noidung">   
    <table style="width:95%;margin:5px auto;">
    <tr>
     <td colspan="3">
        <span class="duoi"><font size="+3"><asp:Literal runat="server" id="stt"></asp:Literal></font></span>
        <span id="tensp" style="float:left;margin-left:10px;"><asp:HyperLink ID="hyp_ten_sp" runat="server" CssClass="hyp_ten_sp"></asp:HyperLink></span>
        <asp:HiddenField ID="hd_stt" runat="server" />
    </td>
    </tr>
    <tr>
        <td rowspan="2" style="width:75%;text-align:center;" colspan="2">
            <div class="discount1"><span>Giảm </span><br /><asp:Literal ID="lit_giam" runat="server"></asp:Literal></div>
            <asp:Image ID="Image1" runat="server" CssClass="discount"/>
            <asp:Image ID="imgsp" runat="server" CssClass="hinhanh"/>
            <hr />
        </td>
        <td style="background-color:#0674BD;border:solid 1px silver;text-align:left;-moz-border-radius-bottomleft:5px;
	-webkit-border-bottom-left-radius:5px;
	-moz-border-radius-bottomright:5px;
	-webkit-border-bottom-right-radius:5px;
	-moz-border-radius-topleft:5px;
	-webkit-border-top-left-radius:5px;
	-moz-border-radius-topright:5px;
	-webkit-border-top-right-radius:5px;">
            <span id="giaban">Giá bán </span><span id="gia_ban"><asp:Literal ID="lit_giaban" runat="server"></asp:Literal></span>
            <br />
            <span id="giagoc">Giá gốc </span><span id="gia_goc"><asp:Literal ID="lit_giagoc" runat="server"></asp:Literal></span>
            <center><br /><asp:HyperLink id="lbt_dathang" CssClass="bt_dathang" runat="server" Text="Thêm vào giỏ hàng" Height="20px" Width="150px"></asp:HyperLink></center>
        </td>
    </tr>
    <tr>
        <td style="background-color:#0fb4e7;border:solid 1px silver;text-align:center;-moz-border-radius-bottomleft:5px;
	-webkit-border-bottom-left-radius:5px;
	-moz-border-radius-bottomright:5px;
	-webkit-border-bottom-right-radius:5px;
	-moz-border-radius-topleft:5px;
	-webkit-border-top-left-radius:5px;
	-moz-border-radius-topright:5px;
	-webkit-border-top-right-radius:5px;" rowspan="2" valign="top">
        <br />
           </font><span><font color="yellow">Số voucher còn </font></span><font color="white"><asp:Literal ID="lit_vccon" runat="server"></asp:Literal></font>
           <br />
           <span><font color="yellow">Đã có </font></span><font color="white"><asp:Literal ID="lit_songuoimua" runat="server"></asp:Literal></font><span><font color="yellow"> voucher được đặt</font></span>
            <asp:ListBox CssClass="danhsach" ID="txtdsnguoidat" runat="server" TextMode="MultiLine" Width ="90%" Height="75%" ></asp:ListBox>
        </td>
    </tr>
    <tr>
        <td valign="top" style="width:20%" align="center">
           <span>Thời gian đặt hàng đến </span>
           <br /><font style="color:Blue" size="+1"><asp:Literal ID="lit_ngayhethan" runat="server"></asp:Literal></font>
            </td>
            <td style="padding-left:20px;">
            <style type="text/css">
                @import "jquery.countdown.css";
                #defaultCountdown<%=div_id %> { width: 240px; }
            </style>
          <script type="text/javascript">
            $(function () {
                shortly = new Date(); 
                shortly.setSeconds(shortly.getSeconds() + <%=sogiay[div_id - sosp] %>); 
	            $('#defaultCountdown<%=div_id%>').countdown({onExpiry: liftOff, until: shortly});
            });
//           function liftOff() { 
//                $.ajax({
//                  type: "GET",
//                  url: "hethan.aspx?id=<%=stt_sp[div_id - sosp] %>"
//                }).done(function( ) {
//                    window.location = "Default.aspx";
//                });
//            }  
            </script>
           <span>Còn lại <div id="defaultCountdown<%=div_id%>"></div></span>
       <% div_id = div_id + 1; %>
        </td>
    </tr>
     <tr>
        <td colspan="2" style="border-top:solid 1px silver;border-left:solid 1px silver;">
        <font size="+1" color="blue">Thông tin sản phẩm</font><br />
        <asp:Literal ID="lit_ttsp" runat="server"></asp:Literal>
        </td>
        <td align="center" valign="bottom">
        <asp:HyperLink ID="bt_chitiet" CssClass="buttonchi_tiet" Width="125px" Height="20px" Text="Thông tin chi tiết" runat="server"  ></asp:HyperLink>
        </td>
    </tr>
    </table>
    </div>  
    </ItemTemplate>
    </asp:Repeater>
    <script type="text/javascript">
     function liftOff() { 
                $.ajax({
                  type: "GET",
                  url: "hethan.aspx?id=<%=id_hethan %>"
                }).done(function( ) {
                    window.location = "Default.aspx";
                });
            }  
    </script>
 <div class="page">
     <cc1:PagerV2_8 ID="pager" runat="server" />
     <asp:Literal ID="Literal1" runat="server"></asp:Literal>
 </div>

</asp:Content>

